import { createStore, combineReducers } from 'redux'
import count  from './reducers/count'
import num  from './reducers/num'
// combineReducers  合并reducers

// redux-saga


// let reducer = (state, { type }) => {
//     return {
//         count: count(state.count, type),
//         num: num(state.num, type)
//     }
// }

let reducer = combineReducers({
    count,
    num
})

// let initState = {
//     count: 100,
//     num: 888
// }

let store = createStore(reducer)

export default store